home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / UTILITY / CRYPTE11.ARJ / CRYPTE.DOC next >
Text File  |  1992-05-20  |  14KB  |  272 lines

  1. CRYPTE.DOC
  2. Documentation file for CRYPTE.EXE, RANDKEY.EXE, and FASTKEY.EXE.
  3.  
  4.  
  5. WHAT IS CRYPTE?
  6.  
  7. CRYPTE is a file encryption utility designed to protect the privacy of your
  8. files.  It uses a key file that can vary in length from 4 bytes to the length
  9. of the file to be encrypted.  Key files may be longer, but bytes beyond the
  10. length of the file to be encrypted are not used.
  11.  
  12.  
  13. LEGAL STUFF
  14.  
  15. Article the sixth... The right of the people to be secure in their persons,
  16. houses, papers, and effects, against unreasonable searches and seizures, shall
  17. not be violated, and no Warrants shall issue, but upon probable cause,
  18. supported by oath or affirmation, and particularly describing the place to be
  19. searched, and the persons or things to be seized.
  20.  
  21. Encryption and privacy software is subject to United States of America export
  22. control laws and the International Traffic in Arms Regulations.  It is the
  23. responsibility of the user to ensure compliance with these laws.
  24.  
  25. CRYPTE, RANDKEY, FASTKEY, and this file are copyright (C) 1988 and 1992
  26. Michael Paul Johnson.  All rights reserved.  Permission is granted for these
  27. files to be distributed freely to any destination within the USA for trial use
  28. purposes.  It is the responsibility of the user to determine the suitability
  29. of this program for his/her intended use.  No liability of any sort will be
  30. assumed by the author for any damages or loss of data resulting from the use
  31. of this program. This program is intended to protect the privacy of data while
  32. stored or transmitted.  Its used for any illegal activity is NOT condoned by
  33. the author.  It is recommended that you try this program out on noncritical
  34. data before you use it on anything important to make sure that you understand
  35. how it works.  While I believe that this program is reliable, if you find any
  36. bugs, please let me know so that I can correct them.
  37.  
  38. If you use this program regularly, then you are required to register it by
  39. sending $20.00 and the name of this program to the author at PO BOX 1151,
  40. LONGMONT CO 80502-1151.  Support for registered users is available on the
  41. Rainbow Missions BBS at 303-938-9654, and by mail.
  42.  
  43.  
  44. HOW DOES CRYPTE COMPARE WITH OTHER ENCRYPTION PROGRAMS?
  45.  
  46. CRYPTE is one of several encryption programs written by Mike Johnson.  The
  47. major versions and their characteristics follow.
  48.  
  49. CRYPTA is designed for security against the average hacker who has limited
  50. time for cryptanalysis.  It uses a password from the command line of variable
  51. length.  Partially correct passwords may result in partially correct
  52. decryptions.  It encrypts and decrypts files in place.
  53.  
  54. CRYPTE uses a more secure algorithm than CRYPTA, but is much less tolerant of
  55. errors.  A one bit error in the key or the encrypted file is likely to cause a
  56. very drastic error of up to 16384 bytes in length when the file is decrypted. 
  57. Therefore, when transmitting an encrypted file by modem, always be sure to use
  58. a binary file transfer protocol (like xmodem or kermit).  It can encrypt a
  59. directory and all of its subdirectories.  It allows you the option of hiding
  60. encrypted files or not.  It is less picky about the command line syntax, in
  61. that the switches are not required to appear in any particular order.  CRYPTE
  62. does not have to create a temporary file to decrypt, like CRYPTD, and
  63. therefore can operate with less free disk space.
  64.  
  65. CRYPTO is based on DES in block chaining with ciphertext feedback mode.  The
  66. initialization vector is fixed.
  67.  
  68. CRYPTDES is an upgrade of CRYPTO that uses a different initialization vector.
  69.  
  70. CRYPTMPJ is based on the MPJ encryption algorithm.  This algorithm is more
  71. secure than DES, and its security is not reduced by publishing the algorithm. 
  72.  
  73.  
  74. WHICH OF THE ABOVE ALGORITHMS ARE THE BEST?
  75.  
  76. For maximum security with a relatively short key (16 bytes), or if you want to
  77. know how the program works, use CRYPTMPJ.  For higher speed and security that
  78. depends on the length of the key used, use CRYPTE.
  79.  
  80.  
  81. HOW DO I SELECT A KEY FILE?
  82.  
  83. The key file used by CRYPTE is any binary file of any length from 32 bytes to
  84. 32 megabytes.  Key files of up to 16384 bytes long will result in faster
  85. encryption and decryption  than longer key files because the entire key is
  86. kept in memory.  When you encrypt a file, a maximum of one key byte from the
  87. key file + 8192 bytes is used per byte of data.  The whole file is used in
  88. creating the modified checksum that is used in determining if this file might
  89. have been the encrypting file when you go to decrypt it.  Any kind of file can
  90. be used for a key file:  an .EXE or .COM file, a text file, or a random binary
  91. file.  CRYPTE is most secure when used with a random binary key file, but
  92. CRYPTE is reasonably secure for most applications even with a key that can be
  93. a short text file that you can memorize.  If you try this approach, be sure
  94. that you use the exact same characters, including spaces, carriage returns,
  95. line feeds, and even the presence or absence of a control Z at the end.  In
  96. other words, if you try a memorized key, create it EXACTLY the same as the way
  97. you did when you encrypted the file.  CRYPTE can also use any other file (for
  98. example, a .COM file) for a key.  The maximum security that is attainable
  99. with CRYPTE is to create a random key file.  This can be done best by using
  100. RANDKEY, FASTKEY, or by using another encryption algorithm (such as DES or
  101. MPJ) as a random number generator.
  102.  
  103.  
  104. HOW DOES RANDKEY WORK?
  105.  
  106. RANDKEY generates a random sequence by using the NBS DES as a pseudorandom
  107. number generator, started with seeds that depend in a complex manner on your
  108. system clock, the Turbo Pascal 5.0 random number generator, and on the
  109. characters you type on the keyboard.  Each time you type a key, both the key
  110. you type and the time that you typed it are used to change the pseudorandom
  111. sequence.  This program will run without operator input, but it is the
  112. operator input that makes the difference between random and pseudorandom. 
  113. Even if someone could guess the exact time (to a 100th of a second) on your
  114. system real time clock that you ran RANDKEY and run the program at the same
  115. clock speed as your computer, with a disk with the same access time, there is
  116. no way to compute what keys you pressed at what time to generate the key.
  117.  
  118. RANDKEY requires two inputs besides the random keys that you type:  the file
  119. name of the key you are generating, and the size of the file in bytes.  These
  120. can either be entered on the command line or, if they are not on the command
  121. line (file name first), then the program will prompt you for these inputs.
  122.  
  123.  
  124. HOW DOES FASTKEY WORK?
  125.  
  126. Just like RANDKEY, except that it uses the Turbo Pascal 5.0 random number
  127. generator instead of the NBS DES algorithm.  This makes it faster, but a bit
  128. more dependent on the operator for good random key stroke (both in timing and
  129. in the keys pressed) input.
  130.  
  131.  
  132. HOW DOES CRYPTE WORK?
  133.  
  134. CRYPTE is designed to work from the command line so that it is easy to put in
  135. batch files.  The syntax is:
  136.  
  137. CRYPTE [/E|/D] [/S] [/V] keyfile file(s) [other files]
  138.  
  139. The /E or /D is used to determine if you desire to encrypt or decrypt.  If you
  140. don't specify either, then decryption is performed.  If you specify both, the
  141. last one counts.  /S, if present, means that you would like all subdirectories
  142. under the ones specified in the list of files scanned and processed.  /V means
  143. that you want visible files left visible after encryption.  This is useful if
  144. you are encrypting a file for transmission by modem.  Any of the above
  145. switches (/E, /D, /S, and /V) may appear in any order, and they may appear
  146. before or after the file names.  Switches may optionally be preceded with a -
  147. for you UNIX fans.  They are not case sensitive.  In other words, -S, /S, -s,
  148. and /s all mean the same thing.  There must be a space between all switches
  149. and file names on the command line.  The first file name listed is the key
  150. file, and may include a drive and path name, like A:\SECRET\KEY.BIN or
  151. A:KEY.ONE.  The keyfile must be the same for encryption and decryption.  The
  152. files to encrypt or decrypt may include the DOS wild card characters * and ?. 
  153. There may be multiple file specifications listed to encrypt or decrypt.  File
  154. specifications may include drive and path names.  Several different file
  155. specifications may be listed on the same command line.
  156.  
  157. The encrypted file will be 9 bytes longer than the plain file.  This is
  158. because of the modified CRC of the key file and the attribute and date/time
  159. stamp of the original file.  The file is encrypted in place, so that after
  160. encryption, all of Norton's and Maces utilities cannot retrieve the plain file
  161. without the key (unless there are other erased copies of it hanging around on
  162. your hard disk -- these can be overwritten with my KILL (for files that
  163. haven't been erased yet), ZAP (for erased files), or Norton's WIPEFILE
  164. utilities.  The encrypted file will have the hidden and read only bits set in
  165. their directory entries unless you specified the /V switch on the command
  166. line.  These make the files a bit less obvious, but not difficult to find by
  167. any hacker with a good collection of public domain utilities or Norton's good
  168. work.  Of course, even a good hacker won't be able to read the files without
  169. your key.  Therefore, it is a good idea to keep the key file on a floppy disk
  170. (or better yet, two copies of the key file on two disks) that you lock up.  It
  171. is also a good idea to keep backups of your hard disk current in case disaster
  172. (natural, unintentional, or intentional) strikes your hard disk.
  173.  
  174. When decrypting files, make sure that there is enough room on the default
  175. drive (where you run CRYPTD from) to make a temporary file that is as big as
  176. the largest file that you are going to decrypt.  If you forget this little
  177. detail and the program halts with an error message that says that it is unable
  178. to open the temporary file, then your encrypted version of the file will still
  179. be intact.
  180.  
  181.  
  182. JUST HOW SECURE IS CRYPTE?
  183.  
  184. CRYPTE is approximately as secure as the one time pad IF:
  185.  
  186. 1.  you encrypt every file with a different random key file generated with
  187. RANDKEY (using lots of keyboard input) or another random number generator that
  188. is at least as good, and
  189.  
  190. 2.  the each key file is at least as long as the file it is used to encrypt,
  191. rounded up to the next 16384 byte increment, and
  192.  
  193. 3.  you use each key file only once, and
  194.  
  195. 4.  you keep your key file locked in a secure place, and 
  196.  
  197. 5.  you overwrite (not just erase) any traces of the unencrypted file and
  198. the key on your fixed hard disk, and
  199.  
  200. 6.  you keep your key file on a floppy disk (or other removable
  201. media) that is locked in a secure safe, and
  202.  
  203. 7.  you use an unaltered copy of CRYPTE (straight from the author), and
  204.  
  205. 8.  your system contains no viruses or RAM resident software that defeats the
  206. encryption process by keeping a copy of the plain text, and
  207.  
  208. 9.  you turn your computer off for at least 30 seconds after you do the
  209. encryption to erase any traces of the key and/or plain text that might be left
  210. in RAM, such as in a command line editor command history.
  211.  
  212. CRYPTE is not really very secure if you let the key be known by anyone that
  213. you do not trust, or if you use a key that can be guessed, or if you use a key
  214. that is short enough to get by trial and error.  The key should be at least 16
  215. bytes long, even though CRYPTD will accept shorter keys.
  216.  
  217. CRYPTE is less secure than CRYPTMPJ when using the same key length (16 bytes),
  218. but it is more secure than CRYPTMPJ when used in its provably secure mode
  219. (following the 9 conditions above).
  220.  
  221. CRYPTE is "secure enough" for most commercial applications if each key is used
  222. for no more than 100 files, and if the key is approximately as long as the
  223. longest file to be encrypted, OR if the key is only used for one file and the
  224. key is at least 32 bytes or 1% of the file length to be encrypted, whichever
  225. is greater.
  226.  
  227.  
  228. CAN AN ENCRYPTED FILE BE RECOVERED WITHOUT THE KEY?
  229.  
  230. There is no way that I know of to recover an encrypted file without the key
  231. unless (1) the key can be guessed, (2) the key is short enough to find by
  232. brute force, (3) there is another copy of the file that can be recovered
  233. that is not encrypted, or (4) the key can be recovered by attempting to
  234. reproduce the way that the key was generated.  If the key was a long key
  235. generated with RANDKEY or FASTKEY with keyboard input being performed by a
  236. one year old child, then the data is gone forever without the key.  There is
  237. no "back door" or "master key" to this algorithm.
  238.  
  239.  
  240. WHAT IF I GOOF AND DECRYPT THE FILE WITH THE WRONG KEY?
  241.  
  242. CRYPTE attempts to catch this error and give you an "ACCESS DENIED" message
  243. (and an obnoxious siren on some computers), but it may not.  If it doesn't,
  244. then encrypt the file again with the SAME wrong key.  Then decrypt the file
  245. with the proper key.
  246.  
  247.  
  248. WHAT IF I RUN OUT OF DISK SPACE WHILE ENCRYPTING?
  249.  
  250. Adding 9 bytes the end of each file may take up more disk space than you might
  251. think, because if the those 9 bytes will not all fit in the last cluster of
  252. the file, a whole new cluster (usually 2048 bytes) will be allocated to that
  253. file by DOS.  if there is not room for this on your disk, CRYPTE will restore
  254. the file it was about to encrypt to its original unencrypted state, and halt
  255. with an error message.  The files that were encrypted before that point will
  256. be encrypted, but the files that would have been encrypted after that are
  257. still unencrypted.
  258.  
  259.  
  260. USING SUPERENCRYPTION TO INCREASE SECURITY
  261.  
  262. Superencryption is encrypting something more than once with different keys
  263. and/or different algorithms.  With CRYPTE, it does more good to increase the
  264. length of the key file than to encrypt more than once with CRYPTE if the
  265. length of the key file is not yet as long as the file to be encrypted.  It
  266. also does more good to superencrypt using two or more unrelated algorithms
  267. than to use the same one.  For example, a file can be encrypted with CRYPTDES
  268. with key 1, encrypted with CRYPTMPJ with key 2, and then encrypted with CRYPTE
  269. using key 3.  To decrypt the superencrypted file, decrypt in reverse order
  270. (CRYPTE & key 3, then CRYPTMPJ & key 2, then CRYPTDES with key 1).
  271.  
  272.